//
//  GuideCell.swift
//  GuidePage
//
//  Created by Mac on 2021/2/27.
//

import UIKit

class GuideCell: UICollectionViewCell {
    var image: UIImage? {
        didSet {
            guard let image = image else {
                imageView.image = nil
                return
            }
            imageView.image = image
        }
    }
    fileprivate var imageView: UIImageView = UIImageView()
    override init(frame: CGRect) {
        super.init(frame: frame)
        setupUI()
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    
}

extension GuideCell {
    func setupUI() {
        contentView.backgroundColor = .clear
        contentView.addSubview(imageView)
        imageView.frame = contentView.bounds
        imageView.backgroundColor = .clear
    }
}
